package com.itheima.mm.mapper;

import com.itheima.mm.pojo.QuestionItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description QuestionItemMapper
 * @Author xiao
 * @Date 2024-06-27
 */
@Mapper
public interface QuestionItemMapper {

//试题预览有关
    @Select("select * from t_question_item where question_id = #{questionId}")
    List<QuestionItem> getListByQuestionId(Integer questionId);




        //新增选项内容
    void add(QuestionItem questionItem);

    //更新选项内容
    void update(QuestionItem questionItem);

    //根据题id删除选项内容
    @Delete("delete from t_question_item where question_id = #{questionId}")
    void deleteById(Integer questionId);
}
